// 这里引入的是 mobx
import { observable, computed, action, runInAction, useStrict } from 'mobx';
useStrict(true);
 //runInAction -- action方法会立刻执行
class AppStore {
    @observable todos = '2222';
    @observable datas = {};
    @action add = async () => {
      let _this = this ;
          runInAction('获取',() => {
            ajax.get({
              url : '/v2/movie/coming_soon',
              data:''
          })
          .then(function (resp1) {
              _this.datas = resp1;
              console.log(_this.addToDos)
          })
        });
      }
    @computed get addToDos() {
      let message = 0 ;
      return message;
    }
}
export default AppStore ;